﻿
;Display List Tracker script module 

;this code goes below waitnextnote routine in SuperCharger BASIC assembly template:

search on

waitnextnote 

(Find the second instance, which is left aligned)

and paste this code below it, and save it:
Note you can remove it after compiling the BASIC program or experiment with it's effects on other programs.
Function: It creates a display list every frame from the chiptune MUSIC,
The chiptune is programmable like "Big Trek" and create choreography from music:
 

;--------------------------------------------------
;---20250714 display list chiptune choreography:

 lda SWCHB
 sta a;bitwise OR
 lda #%11110111
 ora a;bitwise OR
 CMP #247
 beq skipchoreography; do not engage when bw switch/music editor is in use

 ldx MUSICINDEX
 lda MusicData-3,x
 cmp MusicData-5,x

 beq skipdldec
 bcc skipdlinc
 inc BITIndex
 jmp skipdldec
skipdlinc
 dec BITIndex
skipdldec
 lda MusicData-2,x
 cmp MusicData-4,x
 beq skipincbyterowoffset 
 bcs skipdecbyterowoffset
 lda BYTErowoffset
 sec
 sbc #12
 sta BYTErowoffset
 jmp skipincbyterowoffset
skipdecbyterowoffset
 lda BYTErowoffset
 clc
 adc #12
 sta BYTErowoffset
skipincbyterowoffset 

  lda #1
  sta scrollvirtualworldtoggle  

skipchoreography

 
;--- 2050714 end Display List chiptune choreogrpahy
;-------------------------------------------------- 

